package annotation

import kotlin.reflect.KMutableProperty
import kotlin.reflect.full.memberProperties

@SetValue("Zhang")
class Test(@SetValue("Zhang") var name: String) {
    init {
        Inject.inject(this)
    }

    fun printName() {
        println(name)
    }
}

fun main() {

    val test = Test("hehe")
//    Test::class.memberProperties.forEach {
//        when (it) {
//            is KMutableProperty<*> -> {
//                println("haha")
//                it.setter.call(test, "Zhang")
//            }
//            else -> it.call("Zhang")
//        }
//    }
    test.printName()
}